package com.lzjy.tw.composedemo.domain.model

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.lzjy.tw.composedemo.domain.converter.TestConverter

@TypeConverters(TestConverter::class)
@Entity(tableName = "test")
data class TestModel (
    @PrimaryKey(autoGenerate = true) var id: Int,
    @ColumnInfo(name = "owner_id") var ownerId: Int,
    var width: Float,
    var color: Int,
    @ColumnInfo(name = "son_list") var sonList: List<SonModel>?   //  需要 TestConverter.kt 转换
) {

    inner class SonModel(
        var x: Int,
        var y: Int,
    )
}